#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "QTcpSocket"
#include <QCamera>
#include <QCameraViewfinder>
#include <QCameraImageCapture>

namespace Ui {
class Widget;
}

class QCamera;
class QCameraViewfinder;
class QCameraImageCapture;

class Widget : public QWidget
{
    Q_OBJECT



public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    QTcpSocket *tcpSocket;

private slots:
    void on_ConnectBtn_clicked();
    void connected_Slot();
    void readyRead_Slot();

    void exitBtnResponded();
    void cameraImageCaptured(int, QImage);

    void my_tcp_read();

private:
    QCamera *m_pCamera;       //读取摄像头
    QCameraViewfinder *m_pViewfinder;   //渲染摄像头
    QCameraImageCapture *m_pImageCapture; //获取摄像头当前帧

private:
    Ui::Widget *ui;


};

#endif // WIDGET_H
